package com.aplana.ccsd.model;

import javax.jcr.Node;

public class HorizontalBlock {

	private final int width;
	private final int marginRight;
	private final Node component;

	public HorizontalBlock(int width, int marginRight, Node component) {
		this.width = width;
		this.marginRight = marginRight;
		this.component = component;
	}

	public int getWidth() {
		return width;
	}

	public int getMarginRight() {
		return marginRight;
	}

	public String getHtmlStyle() {
		return "width: " + width + "px; margin-right: " + marginRight + "px;";
	}

	public Node getComponent() {
		return component;
	}

	@Override
	public String toString() {
		return "HorizontalBlock [width=" + width + ", marginRight="
				+ marginRight + ", component=" + component + "]";
	}

}
